﻿using UnityEngine;
using System.Collections;

public class SceneAnimationController : MonoBehaviour {
    enum CharacterSelectSceneAnimation
    {
        Anchor_UI_CharSelect_01_In,
        Anchor_UI_CharSelect_01_Out,
        Anchor_UI_CharSelect_02_In,
        Anchor_UI_CharSelect_02_Out,
        Anchor_UI_CharSelect_03_In,
        Anchor_UI_CharSelect_03_Out,
        Anchor_UI_CharSelect_04_End
    }

    Animator sceneAnimator;

	// Use this for initialization
	void Start () {
        if (sceneAnimator == null)
        {
            sceneAnimator = GetComponent<Animator>();
        }
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    void CheckAndPlayNextAnimation()
    {
        if (sceneAnimator.GetInteger("stateIndex") == 1)
        {
            sceneAnimator.Play(CharacterSelectSceneAnimation.Anchor_UI_CharSelect_02_In.ToString());
        }
    }
}
